package com.loto.graphics;

import java.io.IOException;
import java.text.ParseException;
import javax.swing.JFrame;
import javax.swing.JPanel;

import com.loto.model.CombinaisonModele;


public class SecondFrame {
	private CombinaisonModele combinaisons;
	private Game fenGame;
	private Statistiques fenstat;
	private FrameListe fenliste;
	public SecondFrame(int services) throws ParseException, IOException {
		combinaisons = new CombinaisonModele();
		JFrame fen = null;
		switch (services) {
		case 1:
			fen = fenstat.getInstance();
			break;
		case 2:
			try {
				fen = fenliste.getInstance();

			} catch (IOException e) { }
			break;
		case 3:
			fen = fenGame.getInstance();
			break;
		default:
			throw new IllegalArgumentException("Aucune option");
		}
		fen.setVisible(true);
	}
}
